Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http con man: set response flag on downstream protocol error #8522

Merged
merged 9 commits into from
Oct 23, 2019

Conversation

spenceral
Copy link
Contributor

This adds a new response flag, DPE, that is set when the downstream
request has an HTTP protocol error.

Signed-off-by: Spencer Lewis slewis@squareup.com

Description: Protocol errors previously resulted in just the DC flag being set. Now, DPE will be set when there is a codec exception caused by the downstream request.
Risk Level: low
Testing: unit test
Docs Changes: update list of response flags
Release Notes: added release note
Fixes #8446

This adds a new response flag, DPE, that is set when the downstream
request has an HTTP protocol error.

Signed-off-by: Spencer Lewis <slewis@squareup.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #8522 was opened by spenceral.

see: more, trace.

Signed-off-by: Spencer Lewis <slewis@squareup.com>
@spenceral spenceral force-pushed the downstream-protocol-error branch from 97adccc to 1ce35f5 Compare October 7, 2019 21:05
Signed-off-by: Spencer Lewis <slewis@squareup.com>
Signed-off-by: Spencer Lewis <slewis@squareup.com>
@jmarantz jmarantz requested a review from AndresGuedez October 8, 2019 17:19
@jmarantz jmarantz assigned AndresGuedez and junr03 and unassigned AndresGuedez Oct 8, 2019
@jmarantz jmarantz removed the request for review from AndresGuedez October 10, 2019 12:47
Copy link
Member

@junr03 junr03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple comments. Thanks for adding this!

@@ -3,6 +3,7 @@ Version history

1.12.0 (pending)
================
* access log: added a new flag for downstream protocol error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind adding a ref to the field?

@@ -348,6 +349,9 @@ void ConnectionManagerImpl::resetAllStreams() {
auto& stream = *streams_.front();
stream.response_encoder_->getStream().removeCallbacks(stream);
stream.onResetStream(StreamResetReason::ConnectionTermination, absl::string_view());
if (response_flag) {
stream.stream_info_.setResponseFlag(*response_flag);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the style almost everywhere on the codebase is to use has_value() and value()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that is nicer. Thanks

Signed-off-by: Spencer Lewis <slewis@squareup.com>
@spenceral spenceral force-pushed the downstream-protocol-error branch from 706e274 to 47f5944 Compare October 11, 2019 18:49
@spenceral
Copy link
Contributor Author

Force pushed the last commit because I forgot to sign 🙃

Signed-off-by: Spencer Lewis <slewis@squareup.com>
@spenceral
Copy link
Contributor Author

I think the failing test is a flake. When I locally run

bazel test //test/integration:http_subset_lb_integration_test --nocache_test_results --runs_per_test=100

I get

INFO: Build completed, 1 test FAILED, 101 total actions
//test/integration:http_subset_lb_integration_test                       FAILED in 1 out of 100 in 1.8s

@spenceral
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

🐴 hold your horses - no failures detected, yet.

🐱

Caused by: a #8522 (comment) was created by @spenceral.

see: more, trace.

@spenceral
Copy link
Contributor Author

@junr03 is there a way to rerun the Azure tests?

@junr03
Copy link
Member

junr03 commented Oct 17, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@spenceral
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 8522 in repo envoyproxy/envoy

Signed-off-by: Spencer Lewis <slewis@squareup.com>
@junr03
Copy link
Member

junr03 commented Oct 21, 2019

@htuch this change lgtm, do you mind doing the last pass given it needs API approval?

htuch
htuch previously approved these changes Oct 22, 2019
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@envoyproxy/api-shepherds API LGTM. Ready to merge when CI passes.

@snowp
Copy link
Contributor

snowp commented Oct 22, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattklein123
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattklein123 mattklein123 self-assigned this Oct 23, 2019
@mattklein123
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattklein123
Copy link
Member

Legit format failure. Please merge master and fix format.

/wait

* master: (54 commits)
  Update dependencies - Go, Bazel toos, xxHash, nanopb, rules_go, curl, protobuf, Jinja, yaml-cpp, re2 (envoyproxy#8728)
  test: increase coverage of listener_manager_impl.cc (envoyproxy#8737)
  test: modify some macros to reduce number of uncovered lines reported (envoyproxy#8725)
  build: add a script to setup clang (envoyproxy#8682)
  http: fix ssl_redirect on external (envoyproxy#8664)
  docs: update fedora build requirements (envoyproxy#8641)
  fix draining listener removal logs (envoyproxy#8733)
  dubbo: fix router doc (envoyproxy#8734)
  server: provide server health status when stats disabled (envoyproxy#8482)
  router: adding a knob to configure a cap on buffering for shadowing/retries (envoyproxy#8574)
  tcp proxy: add default 1 hour idle timeout (envoyproxy#8705)
  thrift: fix filter names in docs (envoyproxy#8726)
  Quiche changes to avoid gcc flags on Windows (envoyproxy#8514)
  test: increase test coverage in Router::HeaderParser (envoyproxy#8721)
  admin: add drain listeners endpoint  (envoyproxy#8415)
  buffer filter: add content-length when ending stream with trailers (envoyproxy#8609)
  clarify draining option docs (envoyproxy#8712)
  build: ignore go-control-plane mirror git commit error code (envoyproxy#8703)
  api: remove API type database from checked in artifacts. (envoyproxy#8716)
  admin: correct help strings (envoyproxy#8710)
  ...

Signed-off-by: Spencer Lewis <slewis@squareup.com>
ran ./tools/proto_format.sh fix

Signed-off-by: Spencer Lewis <slewis@squareup.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mattklein123 mattklein123 merged commit 6b3df46 into envoyproxy:master Oct 23, 2019
@spenceral spenceral deleted the downstream-protocol-error branch October 23, 2019 22:07
derekargueta pushed a commit to derekargueta/envoy that referenced this pull request Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP protocol error results in DC access log
6 participants